package com.xiaobai.spike.mapper;

import com.xiaobai.spike.entity.Product;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface OrdersMapper {
    @Select("select * from orders where id = #{id}")
    Product getById(Integer id);

    @Insert("insert into orders(productId, customer) values(#{productId},#{customer})")
    Integer insert(Integer productId, String customer);
}
